package com.example.example5;

import android.app.Service;
import android.content.Intent;
import android.media.MediaPlayer;
import android.os.IBinder;
import android.util.Log;

public class MyAndroidService extends Service {

    private MediaPlayer mp;

    public MyAndroidService() {

    }

    @Override
    public void onCreate() {
        this.mp = MediaPlayer.create(this,R.raw.white);
        mp.start();
        Log.d("TAG", "MyAndroidService onCreate: ");
    }

    @Override
    public void onDestroy() {
        mp.stop();
        Log.d("TAG", "MyAndroidService onDestroy: ");
    }

    @Override
    public IBinder onBind(Intent intent) {
        // TODO: Return the communication channel to the service.
        Log.d("TAG", "MyAndroidService onBind: ");
        return null;
    }
}